package com.zs.framework.mail.config;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;
import org.springframework.validation.annotation.Validated;

import java.util.Properties;

/**
 * @author zhougf
 * @version 1.0
 * @date 2020/07/23
 */
@Validated
@Component
@ConfigurationProperties(prefix = "mail")
@Setter
@Getter
public class MailProperties {

    private String senderAddress;

    private String userName;

    private String userPassword;

    /**
     * 指定连接的邮件服务器的主机名。如：163邮箱就填写smtp.163.com
     */
    private String host;

    /**
     * 服务器主机端口
     */
    private int port;

    /**
     * 指定邮件接收协议
     */
    private String protocol;

    /**
     * 指定邮件接收协议
     */
    private String smtp;

    private Properties config;

}
